#include "stdafx.h"
#include "ServerPacketProducer.h"

#include <Network/TcpConnection.h>
#include <Game/Message.h>

ServerPacketProducer::ServerPacketProducer(void)
{
}

ServerPacketProducer::~ServerPacketProducer(void)
{
}

void ServerPacketProducer::SendPacket(TcpConnection* client, MESSAGE_ID id, void* payload, size_t payloadSize)
{
	size_t packetSize;

	TcpOutgoinigPacketProcessor package;
	TcpPacket* p = package.Pack(id, payload, payloadSize, &packetSize);

	client->Send(p, packetSize);
}